home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / internet / rtrmon / myrtrmn2.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-10-25  |  13.5 KB  |  422 lines

  1. VERSION 2.00
  2. Begin Form frmMyRtrMon 
  3.    BorderStyle     =   3  'Fixed Double
  4.    Caption         =   "Router Monitor"
  5.    ClientHeight    =   3690
  6.    ClientLeft      =   2055
  7.    ClientTop       =   2070
  8.    ClientWidth     =   6405
  9.    Height          =   4095
  10.    Icon            =   MYRTRMN2.FRX:0000
  11.    Left            =   1995
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    ScaleHeight     =   184.5
  15.    ScaleMode       =   2  'Point
  16.    ScaleWidth      =   320.25
  17.    Top             =   1725
  18.    Width           =   6525
  19.    Begin CommandButton cmdExitWindows 
  20.       Caption         =   "E&xit Windows"
  21.       Height          =   495
  22.       Left            =   4860
  23.       TabIndex        =   1
  24.       Top             =   660
  25.       Width           =   1455
  26.    End
  27.    Begin CheckBox chkDisplay 
  28.       Caption         =   "Do Not Display This Screen"
  29.       Height          =   255
  30.       Left            =   120
  31.       TabIndex        =   2
  32.       Top             =   3180
  33.       Width           =   3105
  34.    End
  35.    Begin CommandButton cmdClose 
  36.       Caption         =   "&Close"
  37.       Height          =   495
  38.       Left            =   4860
  39.       TabIndex        =   0
  40.       Top             =   120
  41.       Width           =   1455
  42.    End
  43.    Begin ComboBox cboSystems 
  44.       FontBold        =   0   'False
  45.       FontItalic      =   0   'False
  46.       FontName        =   "MS Sans Serif"
  47.       FontSize        =   8.25
  48.       FontStrikethru  =   0   'False
  49.       FontUnderline   =   0   'False
  50.       ForeColor       =   &H00FF0000&
  51.       Height          =   300
  52.       Left            =   3600
  53.       Style           =   2  'Dropdown List
  54.       TabIndex        =   3
  55.       Top             =   2640
  56.       Width           =   1215
  57.    End
  58.    Begin Image imgRtrMon 
  59.       Height          =   480
  60.       Left            =   60
  61.       Picture         =   MYRTRMN2.FRX:0302
  62.       Top             =   120
  63.       Width           =   480
  64.    End
  65.    Begin Image imgRtrOn 
  66.       Height          =   480
  67.       Left            =   60
  68.       Picture         =   MYRTRMN2.FRX:0604
  69.       Top             =   720
  70.       Visible         =   0   'False
  71.       Width           =   480
  72.    End
  73.    Begin Image imgRtrOff 
  74.       Height          =   480
  75.       Left            =   60
  76.       Picture         =   MYRTRMN2.FRX:0906
  77.       Top             =   1320
  78.       Visible         =   0   'False
  79.       Width           =   480
  80.    End
  81.    Begin Label lblMaxFrameSize 
  82.       BackStyle       =   0  'Transparent
  83.       Caption         =   "lblMaxFrameSize"
  84.       FontBold        =   0   'False
  85.       FontItalic      =   0   'False
  86.       FontName        =   "MS Sans Serif"
  87.       FontSize        =   8.25
  88.       FontStrikethru  =   0   'False
  89.       FontUnderline   =   0   'False
  90.       ForeColor       =   &H00FF0000&
  91.       Height          =   255
  92.       Left            =   3600
  93.       TabIndex        =   4
  94.       Top             =   480
  95.       Width           =   1215
  96.    End
  97.    Begin Label zLBL 
  98.       Alignment       =   1  'Right Justify
  99.       BackStyle       =   0  'Transparent
  100.       Caption         =   "Router Loaded and DLLs Available?:"
  101.       FontBold        =   0   'False
  102.       FontItalic      =   0   'False
  103.       FontName        =   "MS Sans Serif"
  104.       FontSize        =   8.25
  105.       FontStrikethru  =   0   'False
  106.       FontUnderline   =   0   'False
  107.       Height          =   255
  108.       Index           =   0
  109.       Left            =   540
  110.       TabIndex        =   5
  111.       Top             =   120
  112.       Width           =   3015
  113.    End
  114.    Begin Label zLBL 
  115.       Alignment       =   1  'Right Justify
  116.       BackStyle       =   0  'Transparent
  117.       Caption         =   "Maximum Frame Size:"
  118.       FontBold        =   0   'False
  119.       FontItalic      =   0   'False
  120.       FontName        =   "MS Sans Serif"
  121.       FontSize        =   8.25
  122.       FontStrikethru  =   0   'False
  123.       FontUnderline   =   0   'False
  124.       Height          =   255
  125.       Index           =   1
  126.       Left            =   540
  127.       TabIndex        =   18
  128.       Top             =   480
  129.       Width           =   3015
  130.    End
  131.    Begin Label lblLoaded 
  132.       BackStyle       =   0  'Transparent
  133.       Caption         =   "lblLoaded"
  134.       FontBold        =   0   'False
  135.       FontItalic      =   0   'False
  136.       FontName        =   "MS Sans Serif"
  137.       FontSize        =   8.25
  138.       FontStrikethru  =   0   'False
  139.       FontUnderline   =   0   'False
  140.       ForeColor       =   &H00FF0000&
  141.       Height          =   255
  142.       Left            =   3600
  143.       TabIndex        =   17
  144.       Top             =   120
  145.       Width           =   1215
  146.    End
  147.    Begin Label zLBL 
  148.       Alignment       =   1  'Right Justify
  149.       BackStyle       =   0  'Transparent
  150.       Caption         =   "Query Of Conversation State Supported?:"
  151.       FontBold        =   0   'False
  152.       FontItalic      =   0   'False
  153.       FontName        =   "MS Sans Serif"
  154.       FontSize        =   8.25
  155.       FontStrikethru  =   0   'False
  156.       FontUnderline   =   0   'False
  157.       Height          =   255
  158.       Index           =   2
  159.       Left            =   540
  160.       TabIndex        =   16
  161.       Top             =   840
  162.       Width           =   3015
  163.    End
  164.    Begin Label zLBL 
  165.       Alignment       =   1  'Right Justify
  166.       BackStyle       =   0  'Transparent
  167.       Caption         =   "Extended Allocate Supported?:"
  168.       FontBold        =   0   'False
  169.       FontItalic      =   0   'False
  170.       FontName        =   "MS Sans Serif"
  171.       FontSize        =   8.25
  172.       FontStrikethru  =   0   'False
  173.       FontUnderline   =   0   'False
  174.       Height          =   255
  175.       Index           =   3
  176.       Left            =   540
  177.       TabIndex        =   15
  178.       Top             =   1200
  179.       Width           =   3015
  180.    End
  181.    Begin Label lblState 
  182.       BackStyle       =   0  'Transparent
  183.       Caption         =   "lblState"
  184.       FontBold        =   0   'False
  185.       FontItalic      =   0   'False
  186.       FontName        =   "MS Sans Serif"
  187.       FontSize        =   8.25
  188.       FontStrikethru  =   0   'False
  189.       FontUnderline   =   0   'False
  190.       ForeColor       =   &H00FF0000&
  191.       Height          =   255
  192.       Left            =   3600
  193.       TabIndex        =   14
  194.       Top             =   840
  195.       Width           =   1215
  196.    End
  197.    Begin Label lblExtended 
  198.       BackStyle       =   0  'Transparent
  199.       Caption         =   "lblExtended"
  200.       FontBold        =   0   'False
  201.       FontItalic      =   0   'False
  202.       FontName        =   "MS Sans Serif"
  203.       FontSize        =   8.25
  204.       FontStrikethru  =   0   'False
  205.       FontUnderline   =   0   'False
  206.       ForeColor       =   &H00FF0000&
  207.       Height          =   255
  208.       Left            =   3600
  209.       TabIndex        =   13
  210.       Top             =   1200
  211.       Width           =   1215
  212.    End
  213.    Begin Label zLBL 
  214.       Alignment       =   1  'Right Justify
  215.       BackStyle       =   0  'Transparent
  216.       Caption         =   "Default System's User ID:"
  217.       FontBold        =   0   'False
  218.       FontItalic      =   0   'False
  219.       FontName        =   "MS Sans Serif"
  220.       FontSize        =   8.25
  221.       FontStrikethru  =   0   'False
  222.       FontUnderline   =   0   'False
  223.       Height          =   255
  224.       Index           =   5
  225.       Left            =   540
  226.       TabIndex        =   12
  227.       Top             =   1920
  228.       Width           =   3015
  229.    End
  230.    Begin Label zLBL 
  231.       Alignment       =   1  'Right Justify
  232.       BackStyle       =   0  'Transparent
  233.       Caption         =   "Default System:"
  234.       FontBold        =   0   'False
  235.       FontItalic      =   0   'False
  236.       FontName        =   "MS Sans Serif"
  237.       FontSize        =   8.25
  238.       FontStrikethru  =   0   'False
  239.       FontUnderline   =   0   'False
  240.       Height          =   255
  241.       Index           =   4
  242.       Left            =   540
  243.       TabIndex        =   11
  244.       Top             =   1560
  245.       Width           =   3015
  246.    End
  247.    Begin Label lblSystem 
  248.       BackStyle       =   0  'Transparent
  249.       Caption         =   "lblSystem"
  250.       FontBold        =   0   'False
  251.       FontItalic      =   0   'False
  252.       FontName        =   "MS Sans Serif"
  253.       FontSize        =   8.25
  254.       FontStrikethru  =   0   'False
  255.       FontUnderline   =   0   'False
  256.       ForeColor       =   &H00FF0000&
  257.       Height          =   255
  258.       Left            =   3600
  259.       TabIndex        =   10
  260.       Top             =   1560
  261.       Width           =   1215
  262.    End
  263.    Begin Label lblUserID 
  264.       BackStyle       =   0  'Transparent
  265.       Caption         =   "lblUserID"
  266.       FontBold        =   0   'False
  267.       FontItalic      =   0   'False
  268.       FontName        =   "MS Sans Serif"
  269.       FontSize        =   8.25
  270.       FontStrikethru  =   0   'False
  271.       FontUnderline   =   0   'False
  272.       ForeColor       =   &H00FF0000&
  273.       Height          =   255
  274.       Left            =   3600
  275.       TabIndex        =   9
  276.       Top             =   1920
  277.       Width           =   1215
  278.    End
  279.    Begin Label zLBL 
  280.       Alignment       =   1  'Right Justify
  281.       BackStyle       =   0  'Transparent
  282.       Caption         =   "Available Systems:"
  283.       FontBold        =   0   'False
  284.       FontItalic      =   0   'False
  285.       FontName        =   "MS Sans Serif"
  286.       FontSize        =   8.25
  287.       FontStrikethru  =   0   'False
  288.       FontUnderline   =   0   'False
  289.       Height          =   255
  290.       Index           =   7
  291.       Left            =   540
  292.       TabIndex        =   8
  293.       Top             =   2640
  294.       Width           =   3015
  295.    End
  296.    Begin Label zLBL 
  297.       Alignment       =   1  'Right Justify
  298.       BackStyle       =   0  'Transparent
  299.       Caption         =   "Number Of Available Systems:"
  300.       FontBold        =   0   'False
  301.       FontItalic      =   0   'False
  302.       FontName        =   "MS Sans Serif"
  303.       FontSize        =   8.25
  304.       FontStrikethru  =   0   'False
  305.       FontUnderline   =   0   'False
  306.       Height          =   255
  307.       Index           =   6
  308.       Left            =   540
  309.       TabIndex        =   7
  310.       Top             =   2280
  311.       Width           =   3015
  312.    End
  313.    Begin Label lblSystemCount 
  314.       BackStyle       =   0  'Transparent
  315.       Caption         =   "lblSystemCount"
  316.       FontBold        =   0   'False
  317.       FontItalic      =   0   'False
  318.       FontName        =   "MS Sans Serif"
  319.       FontSize        =   8.25
  320.       FontStrikethru  =   0   'False
  321.       FontUnderline   =   0   'False
  322.       ForeColor       =   &H00FF0000&
  323.       Height          =   255
  324.       Left            =   3600
  325.       TabIndex        =   6
  326.       Top             =   2280
  327.       Width           =   1215
  328.    End
  329. Option Explicit
  330.  ' Constants:
  331.   Const sNO = "No"
  332.   Const sQUESTION = "?"
  333.   Const sYES = "Yes"
  334.  ' Variables:
  335.   Dim nRC      As Integer         ' return code
  336. Sub cmdClose_Click ()
  337.   Unload Me
  338. End Sub
  339. Sub cmdExitWindows_Click ()
  340.  ' Description:
  341.  '  End windows because router not loaded
  342.   ' build message to ask user if they want to end windows
  343.   gsMBText = "Are you sure you wish to end Windows?"
  344.   gnMBType = MB_ICONQUESTION Or MB_YESNO Or MB_DEFBUTTON2
  345.   ' if user wants to end
  346.   If MsgBox(gsMBText, gnMBType) = IDYES Then
  347.     nRC = ExitWindows(0, 0)
  348.   End If
  349. End Sub
  350. Sub Form_Load ()
  351.  ' Variables:
  352.   Dim nMaxFrameSize               As Integer
  353.   Dim bQueryConversationSupported As Integer
  354.   Dim bExtendedAllocateSupported  As Integer
  355.   ' title should match caption
  356.   App.Title = Caption
  357.   ' center the form
  358.   Top = (Screen.Height - Height) \ 2
  359.   Left = (Screen.Width - Width) \ 2
  360.   ' tell user to wait
  361.   Screen.MousePointer = HOURGLASS
  362.   ' if router loaded
  363.   If gbRouterLoaded Then
  364.     ' set image on
  365.     imgRtrMon = imgRtrOn
  366.     ' hide exit button
  367.     cmdExitWindows.Visible = False
  368.     ' set label caption
  369.     lblLoaded.Caption = sYES
  370.     ' get router capabilities
  371.     Call zzCAGetCapabilities(Me.hWnd, nMaxFrameSize, bQueryConversationSupported, bExtendedAllocateSupported)
  372.     ' put maximum frame size in label
  373.     lblMaxFrameSize.Caption = Format$(nMaxFrameSize)
  374.     ' is query of conversation state supported
  375.     If bQueryConversationSupported Then
  376.       lblState = sYES
  377.     Else
  378.       lblState = sNO
  379.     End If
  380.     ' is extended allocate supported
  381.     If bExtendedAllocateSupported Then
  382.       lblExtended = sYES
  383.     Else
  384.       lblExtended = sNO
  385.     End If
  386.     ' get system name
  387.     lblSystem = zzCAGetDefaultSystem(Me.hWnd)
  388.     ' get user name
  389.     lblUserID = zzCAGetUserID(Me.hWnd, lblSystem)
  390.     ' get system count
  391.     lblSystemCount = Format$(zzCAGetSystemCount(Me.hWnd))
  392.     ' get system list
  393.     Call zzCAPutSystemListIntoCtrl(Me.hWnd, cboSystems)
  394.   ' if router not loaded
  395.   Else
  396.     ' set image off
  397.     imgRtrMon = imgRtrOff
  398.     ' show exit button
  399.     cmdExitWindows.Visible = True
  400.     ' set captions
  401.     lblLoaded = sNO
  402.     lblMaxFrameSize = sQUESTION
  403.     lblState = sQUESTION
  404.     lblExtended = sQUESTION
  405.     lblSystem = sQUESTION
  406.     lblUserID = sQUESTION
  407.     lblSystemCount = sQUESTION
  408.     ' hide list of systems
  409.     cboSystems.Visible = False
  410.   End If
  411.   ' set form's icon to match image
  412.   Icon = imgRtrMon
  413.   ' no more waiting
  414.   Screen.MousePointer = DEFAULT
  415. End Sub
  416. Sub Form_Unload (Cancel As Integer)
  417.   ' write ini file entry
  418.   nRC = zzINIPutInteger("Omit Check", chkDisplay.Value)
  419.   ' end program
  420.   End
  421. End Sub
  422.